import request from "utils/request";
import {apiIdType, typeObject} from "types";

export const filePath = process.env.REACT_APP_API_URL + '/oss/file/upload'

// 上传文件
export function upload(data: typeObject) {
    return request({
        url: '/oss/file/upload',
        method: 'post',
        data
    })
}

// 获取图片地址
export function getFileInfo(id: apiIdType) {
    return request({
        url: `/file/fileInfo/${id}`,
        method: 'get',
    })
}